<template>
    <el-select v-model="fieldModel" :multiple="fieldItem.options.multiple ? fieldItem.options.multiple : false
        " :placeholder="fieldItem.placeholder ||'请选择'" clearable filterable collapse-tags
        :max-collapse-tags="2" :size="fieldItem.size" :disabled="fieldItem.disabled" :multiple-limit="fieldItem.options.limit"
        style="width: 100%" @change="handleFieldChange">
        <el-option v-for="option in fieldItem.options.items" :key="option.value" :label="option.label"
            :value="option.value"></el-option>
    </el-select>
</template>
<script setup>
import { ref, onMounted, defineModel } from 'vue'
const fieldModel = defineModel()
const props = defineProps({
    fieldItem: { type: Object, default: () => { } }
})
</script>